<?php
/**
 * Description of LoadSkin
 *
 * @author hungnq
 */
class Core_View_Helper_LoadSkin extends Zend_View_Helper_Abstract
{
	public function loadSkin($skin)
	{
		$skinData = new Zend_Config_Xml(SKIN_PATH. '/'.$skin.'/skin.xml');
		$styleSheets = $skinData->stylesheets->toArray();
		if(is_array($styleSheets))
		{
			foreach($styleSheets['stylesheet'] as $styleSheet)
			{
				$this->view->headLink()->appendStylesheet( STATIC_URL . '/media/skin/' . $skin . '/' . $styleSheet.'?v='.SKIN_VERSION);
			}
		}
	}
}
